<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<html>
<head>
    <title>
        <c:if test="${type eq null}">Sent messages</c:if>
        <c:if test="${type eq 'sent'}">Recieved messages</c:if>
    </title>
    <script type="text/javascript" src="/voteup/resources/js/jquery-1.6.1.js"></script>
    <script type="text/javascript" src="/voteup/resources/js/stylescript.js"></script>
</head>
<body>
<c:import url="/WEB-INF/jsp/header.jsp"/>
<c:import url="/WEB-INF/jsp/menu.jsp"/>
<table class="msgtable">
    <tr>
        <td align="left">
            <p><a href="/voteup/messages/sendmessage">Send new message</a></p>
        </td>
        <td align="center">
            <c:if test="${unreadCount!=0}"><a href="/voteup/messages/readmessages">make all messages read</a></c:if>
        </td>
        <td align="right">
            <c:if test="${type eq null}"><p><a href="/voteup/messages?type=sent">Sent messages</a></p></c:if>
            <c:if test="${type eq 'sent'}"><p><a href="/voteup/messages">Recieved messages</a></p></c:if>
        </td>
    </tr>
</table>
<c:import url="/WEB-INF/jsp/messages.jsp"/>
</body>
</html>